<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>位移</title>
  <style>
    .outer {
      width: 200px;
      height: 200px;
      border: 2px solid black;
      margin: 0 auto;
      margin-top: 100px;
      /*开启3D空间 给父元素添加*/
      transform-style: preserve-3d;
      /*设置景深*/
      perspective: 500px;
    }
    .son {
      width: 200px;
      height: 200px;
      background-color: deepskyblue;
      /*transform: rotateX(1deg);*/
      /* 在Z轴向我的眼睛靠近*/
      /*transform: translateZ(150px);*/
      /*三个值一个都不能少*/
      transform: translate3d(100px,100px,200px);
    }
  </style>
</head>
<body>
<div class="outer">
  <div class="son">
    <div class="test">你好啊</div>
  </div>
</div>
</body>
</html>